// main.cpp
#include <iostream>
using namespace std;

class EnemyPlane
{
public:
    EnemyPlane();
    ~EnemyPlane();
    static int getCount();
private:
    static int count;
    int a;
};

int EnemyPlane::count = 0;

EnemyPlane::EnemyPlane()
{
    ++count;
    cout << "EnemyPlane()" << endl;
}

EnemyPlane::~EnemyPlane()
{
    --count;
    cout << "~EnemyPlane()" << endl;
}

int EnemyPlane::getCount()
{
    return count;
}


int main()
{
    cout << "EnemyPlane::getCount(): " << EnemyPlane::getCount() << endl;

    EnemyPlane *stu1 = new EnemyPlane;
    cout << stu1->getCount() << endl;

    EnemyPlane *stu2 = new EnemyPlane;
    cout << stu2->getCount() << endl;


    delete stu1;
    stu1 = nullptr;
    cout << EnemyPlane::getCount() << endl;
    delete stu2;
    stu2 = nullptr;
    cout << EnemyPlane::getCount() << endl;

    return 0;
}